home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
raytrace
/
pov
/
gen
/
prepov05
/
example.pre
< prev
next >
Wrap
Text File
|
1993-02-11
|
2KB
|
99 lines
// Example of preprocesor using PREPOV05
// usage > PREPOV05 EXAMPLE.PRE EXAMPLE.POV
/*
In this example I want to put a ball in the x-z plane using polar notation
z You can define a position in the plane with
^ / a vector with length p, and angle value Alfa.
| /p
| / In cartesian coords x = p*cos(Alfa)
| / z = p*sin(Alfa)
|/ ) Alfa
+---------------->
x
*/
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#d1 = 4
#d2 = 2
// 4 total positions with 2 fractional (X.XX)
#00 = 1
// Camera Zoom value
#01 = 0.785
// Alfa=45 =~ Pi/4
#02 = 10
// p length
#03 = 5
// ball radius
camera
{
location <0 10 -30>
direction <0 0 @00> // @00 = Camera Zoom Value
up <0 1 0>
right <1.333 0 0>
look_at <0 10 10>
}
#declare ball = object
{
sphere{ <0 0 0> @03} // @03 = ball radius
}
#declare oro = texture
{
Gold_Texture
ambient 0.4
diffuse 0.6
reflection 0.40
}
#declare floor = texture
{
checker
color Red
color Blue
ambient 0.3
diffuse 0.7
reflection 0.6
scale <5 5 5>
}
// Light
object
{
light_source { <200 1500 -500> colour White }
}
// --------------------------------- FLOOR
object
{
box{ <-20 -1 0> <20 0 40>}
texture{ floor }
}
#d1 = 8
#d2 = 8
// 8 digits floating point from here
// -------------------------------- BALL
object
{
ball
translate <[@02*cos(@01)] [@03] [@02*sin(@01)]>
texture {oro}
}